﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HammerMUD.System
{
    public enum BaseState
    {
        LogIn,
        Command,
        NewAccount,
        AccountMenu,
        NewCharacter
    }

    public enum LogInState
    {
        NotLoggedIn,
        WaitingOnPassword
    }

    public enum CommandState
    {
        Command
    }

    public enum NewAccountState
    {
        Confirmation,
        NameConfirmation,
        EnterName,
        EnterPassword,
        ConfirmPassword
    }

    public enum NewCharacterState
    {
        Name,
        Race,
        Sex,
        Class
    }

    public enum AccountMenuState
    {
        Menu,
        ChangeEmail,
        ChangePassword,
        ChangePasswordConfirmation,
        CharacterChooser
    }

    /// <summary>
    /// States used to be a huge state machine. This allows us to break up
    /// the state machine in different components that makes everything easier
    /// to read
    /// </summary>
    public class UserState
    {
        public LogInState LogIn;
        public CommandState Command;
        public NewAccountState NewAccount;
        public AccountMenuState AccountMenu;
        public BaseState Base;
        public NewCharacterState NewCharacter;

        public UserState()
        {
            LogIn = LogInState.NotLoggedIn;
            Command = CommandState.Command;
            NewAccount = NewAccountState.Confirmation;
            AccountMenu = AccountMenuState.Menu;
            Base = BaseState.LogIn;
            NewCharacter = NewCharacterState.Name;
        }
    }
}
